Optimal. Leaf size=62 \[ b x \left (3 a^2-b^2\right )+\frac{a^3 \log (\sin (c+d x))}{d}+\frac{b^2 (a+b \tan (c+d x))}{d}-\frac{3 a b^2 \log (\cos (c+d x))}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0759293, antiderivative size = 62, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.158, Rules used = {3566, 3624, 3475} \[ b x \left (3 a^2-b^2\right )+\frac{a^3 \log (\sin (c+d x))}{d}+\frac{b^2 (a+b \tan (c+d x))}{d}-\frac{3 a b^2 \log (\cos (c+d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3566
Rule 3624
Rule 3475
Rubi steps
\begin{align*} \int \cot (c+d x) (a+b \tan (c+d x))^3 \, dx &=\frac{b^2 (a+b \tan (c+d x))}{d}+\int \cot (c+d x) \left (a^3+b \left (3 a^2-b^2\right ) \tan (c+d x)+3 a b^2 \tan ^2(c+d x)\right ) \, dx\\ &=b \left (3 a^2-b^2\right ) x+\frac{b^2 (a+b \tan (c+d x))}{d}+a^3 \int \cot (c+d x) \, dx+\left (3 a b^2\right ) \int \tan (c+d x) \, dx\\ &=b \left (3 a^2-b^2\right ) x-\frac{3 a b^2 \log (\cos (c+d x))}{d}+\frac{a^3 \log (\sin (c+d x))}{d}+\frac{b^2 (a+b \tan (c+d x))}{d}\\ \end{align*}
Mathematica [C] time = 0.190676, size = 79, normalized size = 1.27 \[ -\frac{-2 a^3 \log (\tan (c+d x))-2 b^2 (a+b \tan (c+d x))+(a+i b)^3 \log (-\tan (c+d x)+i)+(a-i b)^3 \log (\tan (c+d x)+i)}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.047, size = 77, normalized size = 1.2 \begin{align*} 3\,x{a}^{2}b-{b}^{3}x+{\frac{{b}^{3}\tan \left ( dx+c \right ) }{d}}+{\frac{{a}^{3}\ln \left ( \sin \left ( dx+c \right ) \right ) }{d}}-3\,{\frac{a{b}^{2}\ln \left ( \cos \left ( dx+c \right ) \right ) }{d}}+3\,{\frac{{a}^{2}bc}{d}}-{\frac{{b}^{3}c}{d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.60093, size = 96, normalized size = 1.55 \begin{align*} \frac{2 \, a^{3} \log \left (\tan \left (d x + c\right )\right ) + 2 \, b^{3} \tan \left (d x + c\right ) + 2 \,{\left (3 \, a^{2} b - b^{3}\right )}{\left (d x + c\right )} -{\left (a^{3} - 3 \, a b^{2}\right )} \log \left (\tan \left (d x + c\right )^{2} + 1\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.82292, size = 185, normalized size = 2.98 \begin{align*} \frac{a^{3} \log \left (\frac{\tan \left (d x + c\right )^{2}}{\tan \left (d x + c\right )^{2} + 1}\right ) - 3 \, a b^{2} \log \left (\frac{1}{\tan \left (d x + c\right )^{2} + 1}\right ) + 2 \, b^{3} \tan \left (d x + c\right ) + 2 \,{\left (3 \, a^{2} b - b^{3}\right )} d x}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 1.37284, size = 92, normalized size = 1.48 \begin{align*} \begin{cases} - \frac{a^{3} \log{\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 d} + \frac{a^{3} \log{\left (\tan{\left (c + d x \right )} \right )}}{d} + 3 a^{2} b x + \frac{3 a b^{2} \log{\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 d} - b^{3} x + \frac{b^{3} \tan{\left (c + d x \right )}}{d} & \text{for}\: d \neq 0 \\x \left (a + b \tan{\left (c \right )}\right )^{3} \cot{\left (c \right )} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.96545, size = 97, normalized size = 1.56 \begin{align*} \frac{2 \, a^{3} \log \left ({\left | \tan \left (d x + c\right ) \right |}\right ) + 2 \, b^{3} \tan \left (d x + c\right ) + 2 \,{\left (3 \, a^{2} b - b^{3}\right )}{\left (d x + c\right )} -{\left (a^{3} - 3 \, a b^{2}\right )} \log \left (\tan \left (d x + c\right )^{2} + 1\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]